gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
double(0) → 0
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0)
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z
↳ QTRS
↳ Overlay + Local Confluence
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
double(0) → 0
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0)
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
double(0) → 0
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0)
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
AVER(sum, z) → GT(sum, double(z))
AVERAGE(x, y) → AVER(plus(x, y), 0)
DOUBLE(s(x)) → DOUBLE(x)
GT(s(x), s(y)) → GT(x, y)
IF(true, sum, z) → AVER(sum, s(z))
AVER(sum, z) → IF(gt(sum, double(z)), sum, z)
AVER(sum, z) → DOUBLE(z)
AVERAGE(x, y) → PLUS(x, y)
PLUS(s(x), y) → PLUS(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
double(0) → 0
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0)
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
AVER(sum, z) → GT(sum, double(z))
AVERAGE(x, y) → AVER(plus(x, y), 0)
DOUBLE(s(x)) → DOUBLE(x)
GT(s(x), s(y)) → GT(x, y)
IF(true, sum, z) → AVER(sum, s(z))
AVER(sum, z) → IF(gt(sum, double(z)), sum, z)
AVER(sum, z) → DOUBLE(z)
AVERAGE(x, y) → PLUS(x, y)
PLUS(s(x), y) → PLUS(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
double(0) → 0
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0)
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
DOUBLE(s(x)) → DOUBLE(x)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
double(0) → 0
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0)
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDP
↳ QDP
DOUBLE(s(x)) → DOUBLE(x)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
DOUBLE(s(x)) → DOUBLE(x)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
PLUS(s(x), y) → PLUS(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
double(0) → 0
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0)
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDP
PLUS(s(x), y) → PLUS(x, y)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
PLUS(s(x), y) → PLUS(x, y)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
GT(s(x), s(y)) → GT(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
double(0) → 0
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0)
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
GT(s(x), s(y)) → GT(x, y)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
GT(s(x), s(y)) → GT(x, y)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
IF(true, sum, z) → AVER(sum, s(z))
AVER(sum, z) → IF(gt(sum, double(z)), sum, z)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
double(0) → 0
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0)
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
IF(true, sum, z) → AVER(sum, s(z))
AVER(sum, z) → IF(gt(sum, double(z)), sum, z)
double(0) → 0
double(s(x)) → s(s(double(x)))
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
plus(0, x0)
plus(s(x0), x1)
double(0)
double(s(x0))
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
plus(0, x0)
plus(s(x0), x1)
average(x0, x1)
aver(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ NonInfProof
AVER(sum, z) → IF(gt(sum, double(z)), sum, z)
IF(true, sum, z) → AVER(sum, s(z))
double(0) → 0
double(s(x)) → s(s(double(x)))
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
double(0)
double(s(x0))
(1) (AVER(x2, s(x3))=AVER(x4, x5) ⇒ IF(true, x2, x3)≥AVER(x2, s(x3)))
(2) (IF(true, x2, x3)≥AVER(x2, s(x3)))
(3) (IF(gt(x6, double(x7)), x6, x7)=IF(true, x8, x9) ⇒ AVER(x6, x7)≥IF(gt(x6, double(x7)), x6, x7))
(4) (double(x7)=x12∧gt(x6, x12)=true ⇒ AVER(x6, x7)≥IF(gt(x6, double(x7)), x6, x7))
(5) (true=true∧double(x7)=0 ⇒ AVER(s(x14), x7)≥IF(gt(s(x14), double(x7)), s(x14), x7))
(6) (gt(x15, x16)=true∧double(x7)=s(x16)∧(∀x17:gt(x15, x16)=true∧double(x17)=x16 ⇒ AVER(x15, x17)≥IF(gt(x15, double(x17)), x15, x17)) ⇒ AVER(s(x15), x7)≥IF(gt(s(x15), double(x7)), s(x15), x7))
(7) (double(x7)=0 ⇒ AVER(s(x14), x7)≥IF(gt(s(x14), double(x7)), s(x14), x7))
(8) (s(s(double(x19)))=s(x16)∧gt(x15, x16)=true∧(∀x17:gt(x15, x16)=true∧double(x17)=x16 ⇒ AVER(x15, x17)≥IF(gt(x15, double(x17)), x15, x17))∧(∀x20,x21,x22:double(x19)=s(x20)∧gt(x21, x20)=true∧(∀x22:gt(x21, x20)=true∧double(x22)=x20 ⇒ AVER(x21, x22)≥IF(gt(x21, double(x22)), x21, x22)) ⇒ AVER(s(x21), x19)≥IF(gt(s(x21), double(x19)), s(x21), x19)) ⇒ AVER(s(x15), s(x19))≥IF(gt(s(x15), double(s(x19))), s(x15), s(x19)))
(9) (0=0 ⇒ AVER(s(x14), 0)≥IF(gt(s(x14), double(0)), s(x14), 0))
(10) (AVER(s(x14), 0)≥IF(gt(s(x14), double(0)), s(x14), 0))
(11) (s(double(x19))=x16∧gt(x15, x16)=true∧(∀x20,x21:double(x19)=s(x20)∧gt(x21, x20)=true ⇒ AVER(s(x21), x19)≥IF(gt(s(x21), double(x19)), s(x21), x19)) ⇒ AVER(s(x15), s(x19))≥IF(gt(s(x15), double(s(x19))), s(x15), s(x19)))
(12) (true=true∧s(double(x19))=0∧(∀x20,x21:double(x19)=s(x20)∧gt(x21, x20)=true ⇒ AVER(s(x21), x19)≥IF(gt(s(x21), double(x19)), s(x21), x19)) ⇒ AVER(s(s(x24)), s(x19))≥IF(gt(s(s(x24)), double(s(x19))), s(s(x24)), s(x19)))
(13) (gt(x25, x26)=true∧s(double(x19))=s(x26)∧(∀x20,x21:double(x19)=s(x20)∧gt(x21, x20)=true ⇒ AVER(s(x21), x19)≥IF(gt(s(x21), double(x19)), s(x21), x19))∧(∀x27,x28,x29:gt(x25, x26)=true∧s(double(x27))=x26∧(∀x28,x29:double(x27)=s(x28)∧gt(x29, x28)=true ⇒ AVER(s(x29), x27)≥IF(gt(s(x29), double(x27)), s(x29), x27)) ⇒ AVER(s(x25), s(x27))≥IF(gt(s(x25), double(s(x27))), s(x25), s(x27))) ⇒ AVER(s(s(x25)), s(x19))≥IF(gt(s(s(x25)), double(s(x19))), s(s(x25)), s(x19)))
(14) (gt(x25, x26)=true∧double(x19)=x26∧(∀x20,x21:double(x19)=s(x20)∧gt(x21, x20)=true ⇒ AVER(s(x21), x19)≥IF(gt(s(x21), double(x19)), s(x21), x19)) ⇒ AVER(s(s(x25)), s(x19))≥IF(gt(s(s(x25)), double(s(x19))), s(s(x25)), s(x19)))
(15) (true=true∧double(x19)=0∧(∀x20,x21:double(x19)=s(x20)∧gt(x21, x20)=true ⇒ AVER(s(x21), x19)≥IF(gt(s(x21), double(x19)), s(x21), x19)) ⇒ AVER(s(s(s(x31))), s(x19))≥IF(gt(s(s(s(x31))), double(s(x19))), s(s(s(x31))), s(x19)))
(16) (gt(x32, x33)=true∧double(x19)=s(x33)∧(∀x20,x21:double(x19)=s(x20)∧gt(x21, x20)=true ⇒ AVER(s(x21), x19)≥IF(gt(s(x21), double(x19)), s(x21), x19))∧(∀x34,x35,x36:gt(x32, x33)=true∧double(x34)=x33∧(∀x35,x36:double(x34)=s(x35)∧gt(x36, x35)=true ⇒ AVER(s(x36), x34)≥IF(gt(s(x36), double(x34)), s(x36), x34)) ⇒ AVER(s(s(x32)), s(x34))≥IF(gt(s(s(x32)), double(s(x34))), s(s(x32)), s(x34))) ⇒ AVER(s(s(s(x32))), s(x19))≥IF(gt(s(s(s(x32))), double(s(x19))), s(s(s(x32))), s(x19)))
(17) (double(x19)=0 ⇒ AVER(s(s(s(x31))), s(x19))≥IF(gt(s(s(s(x31))), double(s(x19))), s(s(s(x31))), s(x19)))
(18) (AVER(s(x32), x19)≥IF(gt(s(x32), double(x19)), s(x32), x19)∧(∀x34,x35,x36:gt(x32, x33)=true∧double(x34)=x33∧(∀x35,x36:double(x34)=s(x35)∧gt(x36, x35)=true ⇒ AVER(s(x36), x34)≥IF(gt(s(x36), double(x34)), s(x36), x34)) ⇒ AVER(s(s(x32)), s(x34))≥IF(gt(s(s(x32)), double(s(x34))), s(s(x32)), s(x34))) ⇒ AVER(s(s(s(x32))), s(x19))≥IF(gt(s(s(s(x32))), double(s(x19))), s(s(s(x32))), s(x19)))
(19) (0=0 ⇒ AVER(s(s(s(x31))), s(0))≥IF(gt(s(s(s(x31))), double(s(0))), s(s(s(x31))), s(0)))
(20) (AVER(s(s(s(x31))), s(0))≥IF(gt(s(s(s(x31))), double(s(0))), s(s(s(x31))), s(0)))
(21) (AVER(s(x32), x19)≥IF(gt(s(x32), double(x19)), s(x32), x19) ⇒ AVER(s(s(s(x32))), s(x19))≥IF(gt(s(s(s(x32))), double(s(x19))), s(s(s(x32))), s(x19)))
POL(0) = 0
POL(AVER(x1, x2)) = -1 + x1 - x2
POL(IF(x1, x2, x3)) = -1 - x1 + x2 - x3
POL(c) = -1
POL(double(x1)) = 0
POL(false) = 0
POL(gt(x1, x2)) = 0
POL(s(x1)) = 1 + x1
POL(true) = 0
The following pairs are in Pbound:
IF(true, sum, z) → AVER(sum, s(z))
The following rules are usable:
AVER(sum, z) → IF(gt(sum, double(z)), sum, z)
gt(x, y) → gt(s(x), s(y))
true → gt(s(x), 0)
false → gt(0, y)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ NonInfProof
↳ AND
↳ QDP
↳ DependencyGraphProof
↳ QDP
AVER(sum, z) → IF(gt(sum, double(z)), sum, z)
double(0) → 0
double(s(x)) → s(s(double(x)))
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
double(0)
double(s(x0))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ NonInfProof
↳ AND
↳ QDP
↳ QDP
↳ DependencyGraphProof
IF(true, sum, z) → AVER(sum, s(z))
double(0) → 0
double(s(x)) → s(s(double(x)))
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
double(0)
double(s(x0))